﻿
using BCCommon;
using BCCommon.Enums;
using BCData.Common.DictionaryCategory;
using BCDto.Common.DictionaryCategory;
using BCDto.Sim.Admin.Admin;
using BCEntity.Common.DictionaryCategory;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.Common.DictionaryCategory
{
    /// <summary>
    /// 字典分类
    /// </summary>
    public interface IDictionaryCategoryService
    {
        #region  成员方法
        /// <summary>
        /// 是否存在此记录
        /// </summary>
        /// <param name="dictionaryCategoryId">字典分类Id</param>
        bool Exists(long dictionaryCategoryId);
        /// <summary>
        /// 是否存在此记录
        /// </summary>
        /// <param name="categoryCode">分类编码</param>
        /// <returns></returns>
        bool Exists(string categoryCode);
        /// <summary>
        /// 添加字典分类
        /// </summary>
        /// <param name="requestDto">字典分类信息</param>
        /// <param name="adminDto">管理员信息</param>
        DictionaryCategoryDto Add(DictionaryCategoryRequestDto requestDto, AdminDto adminDto);
        /// <summary>
        /// 更新字典分类
        /// </summary>
        /// <param name="putDto">字典分类信息</param>
        /// <param name="adminDto">管理员信息</param>
        DictionaryCategoryDto Update(DictionaryCategoryPutDto putDto, AdminDto adminDto);
        /// <summary>
        /// 删除字典分类
        /// </summary>
        /// <param name="dictionaryCategoryId">字典分类Id</param>
        bool Delete(long dictionaryCategoryId);
        /// <summary>
        /// 获取字典分类
        /// </summary>
        /// <param name="dictionaryCategoryId">字典分类Id</param>
        DictionaryCategoryDto Get(long dictionaryCategoryId);
        /// <summary>
        /// 获取字典分类列表
        /// </summary>
        /// <param name="parentCategoryId">父级分类Id</param>
        IEnumerable<DictionaryCategoryDto> GetList(long? parentCategoryId);
        /// <summary>
        /// 获取字典分类列表
        /// </summary>
        /// <param name="systemType">系统类型</param>
        IEnumerable<DictionaryCategoryDto> GetList(BCSystemType systemType);
        /// <summary>
        /// 获取字典分类分页列表
        /// </summary>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">字典分类每页数据条数</param>
        PageableList<DictionaryCategoryDto> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}